<%@ page import="study.itheima.bean.Stu" %>
<%@ page import="java.util.Map" %>
<%@ page import="java.util.HashMap" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>elprac1</title>
</head>
<body>
<%
    session.setAttribute("天王盖地虎","小鸡炖蘑菇");
    pageContext.setAttribute("天王盖地虎","宝塔镇河妖");
    Stu stu = new Stu("张三",18,100);
    session.setAttribute("student",stu);
    HashMap<String, Stu> map = new HashMap<>();
    map.put("sss",stu);
    session.setAttribute("mapel",map);
    int[] arr ={1,2};
    int[] arr1 ={};
    session.setAttribute("arrel",arr);
    session.setAttribute("arrel1",arr1);
%>
字符串pagecontext:${天王盖地虎}<br/>
字符串session:${pageContext.session.getAttribute("天王盖地虎")}<br/>
字符串session:${sessionScope.天王盖地虎}<br/>
学生姓名${student.stuname}<br/>
学生年龄${student.stuage}<br/>
学生分数${student.stuscore}<br/>
map集合${mapel.sss.stuname}<br/>
arr集合${mapel.sss.stuage}<br/>
arr1集合${mapel.sss.stuscore}<br/>
====================<br/>
map是否为空${empty map}<br/>
arr是否为空${empty arr}<br/>
arr1是否为空${empty arr1}<br/>
=============<br/>
map是否为空${empty mapel}<br/>
arr是否为空${empty arrel}<br/>
arr1是否为空${empty arrel1}<br/>
获取虚拟目录${pageContext.request.contextPath}<br/>
</body>
</html>
